﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UniMana.Utils.Helper;
namespace UniMana.Utils.Config
{
    public class ServerConfig
    {
        //private static string mDataSource = @"192.168.254.200";
       // private static string mDataSource = @"192.168.4.198";
        public static string mDataSource = @"(local)";
        public static string mDataBase = "UniMana";
        public static string mUser = "sa";
        public static string mPassword = "cachua123456";
        public static string mConnectionString = "";

        //private static ClsRegistryOperator regOperator = new ClsRegistryOperator();
        //public static string mDataSource = regOperator.LoadInfoRegistry("DataSource".Encrypt());
        //public static string mDataBase = regOperator.LoadInfoRegistry("DataBase".Encrypt());
        //public static string mUser = regOperator.LoadInfoRegistry("User ID".Encrypt());
        //public static string mPassword = regOperator.LoadInfoRegistry("Password".Encrypt());
        //public static string mConnectionString = "";

        public static string ConnectionString
        {
            get
            {
                //mConnectionString = @"Server = " + mDataSource + ";Initial Catalog= " + mDataBase + ";Persist Security Info=True ;User ID= " + mUser + ";Password=" + mPassword;
                mConnectionString = @"Server=GIAP\SQLEXPRESS;Database=UniMana;Trusted_Connection=True"; //Home server : no user/no password
                return mConnectionString;
            }
        }

       
    }
}
